package com.lizhi.menu.common.entity;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import javax.validation.constraints.NotNull;


/**
 * @author lizhi
 * @description PageQuery
 */
@Data
public class PageQuery<T> {

    @NotNull(message = "当前页不能为空")
    private Integer pageNo;

    @NotNull(message = "行数为空")
    private Integer pageSize;

    public Page<T> createPage() {
        return new Page<T>(pageNo, pageSize);
    }

}
